package com.aaa.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface S_RegistDao {

    @Select("select * from manage_unit")
    List<Map> selManage();

    @Select("select * from unit_type")
    List<Map> selType();

    @Select("select * from unit_nature")
    List<Map> selNature();

    @Select("select * from industry")
    List<Map> selIndustry();

    @Select("select * from grading")
    List<Map> selGrading();

    @Insert("insert into regist(manage,name,type,nature,industry,grading,unituser,password,number,email,linkman,linknum,address,introduce)" +
            " values(#{manage},#{name},#{type},#{nature},#{industry},#{grading},#{unituser},#{password2}," +
            " #{number},#{email},#{linkman},#{linknum},#{address},#{introduce})")
    int addUnit(Map map);

    @Insert("insert into emp(ename,state,roleid,username,password,dizhi) values(#{name},'正常',11,#{unituser},#{password2},#{address})")
    void addEmp(Map map);
}
